package org.fujene.memman;

import java.util.ArrayList;
import java.util.concurrent.Callable;

import org.fujene.structure.ExtendTerm;

public class TermSnapshoter implements Callable<ArrayList<ExtendTerm>>{
	private ReplicateMemoryManager manager;
	private long hashFrom, hashTo;
	private int type;
	
	public TermSnapshoter(ReplicateMemoryManager manager, long targetHashFrom, long targetHashTo, int type){
		this.manager = manager;
		this.hashFrom = targetHashFrom;
		this.hashTo = targetHashTo;
		this.type = type;
	}
	
	@Override
	public ArrayList<ExtendTerm> call() throws Exception{
		ArrayList<ExtendTerm> returner = manager.getTermList(hashFrom, hashTo, type);
		return returner;
	}
}
